projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3086c05
)
bzlib: Update destLen even on error
author
Simon Glass
<
[email protected]
>
Tue, 2 Dec 2014 20:17:38 +0000
(13:17 -0700)
committer
Tom Rini
<
[email protected]
>
Wed, 14 Jan 2015 16:35:44 +0000
(11:35 -0500)
This allows the caller to easily detect how much of the destination buffer
has been used.
Signed-off-by: Simon Glass <
[email protected]
>
lib/bzip2/bzlib.c
patch
|
blob
|
history
diff --git
a/lib/bzip2/bzlib.c
b/lib/bzip2/bzlib.c
index 5844e187c098bcb2d7a64b07cd436b8a0d25395a..9262e4055ed70e23c3331ad11a34a4805befe69c 100644
(file)
--- a/
lib/bzip2/bzlib.c
+++ b/
lib/bzip2/bzlib.c
@@
-1350,11
+1350,11
@@
int BZ_API(BZ2_bzBuffToBuffDecompress)
strm.avail_out = *destLen;
ret = BZ2_bzDecompress ( &strm );
+ *destLen -= strm.avail_out;
if (ret == BZ_OK) goto output_overflow_or_eof;
if (ret != BZ_STREAM_END) goto errhandler;
/* normal termination */
- *destLen -= strm.avail_out;
BZ2_bzDecompressEnd ( &strm );
return BZ_OK;